package com.zqh.myfmmall.clients;

import com.zqh.myfmmall.fallback.OrderItemSaveClientFallback;
import com.zqh.myfmmall.result.Result;
import com.zqh.myfmmall.rowbeans.entity.OrderItem;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Description :
 * @Author :kono淇杭哒、
 * @Create 2022-02-23 22:32
 */
@FeignClient(value = "orderitem-save",fallbackFactory = OrderItemSaveClientFallback.class)
public interface OrderItemSaveClient{
    @PostMapping("orderItem/create")
    Result create(@RequestBody OrderItem orderItem);

    /*@PostMapping("orderItem/createBatch")
    Result createBatch(@RequestBody String orderItemsJsonString);*/

    @PostMapping("orderItem/createBatch")
    Result createBatch(@RequestBody List<OrderItem> orderItems);
}
